package muse.widgets;

import com.sun.awt.AWTUtilities;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.net.MalformedURLException;
import java.net.URL;
import javax.swing.*;

public class MuseWidget extends JPanel {
        
        public MuseWidget()
        {
            //initialize base layer
            this.setLayout(new BorderLayout());
            this.setOpaque(false);
            JPanel base_layer = new JPanel();
            base_layer.setLayout(new GridBagLayout());
            base_layer.setOpaque(false);
            GridBagConstraints c = new GridBagConstraints();
            
            //build level two layer components
            ImageIcon museIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(getClass().getClassLoader().getResource("muse/resources/smile.gif")));
            JLabel museLabel = new JLabel();
            museLabel.setOpaque(false);
            museLabel.setIcon(museIcon);
            museLabel.setPreferredSize(new Dimension(museIcon.getIconWidth(), museIcon.getIconHeight()));
            
            //add the level two layer components
            c.fill = GridBagConstraints.BOTH;;
            c.gridx     = 0;    c.gridy      = 0;
            c.gridwidth = 1;    c.gridheight = 1;
            c.ipadx     = 0;    c.ipady      = 0;
            c.weightx   = 1.0;  c.weighty    = 1.0;
            c.insets = new Insets(0, 0, 0, 0);
            base_layer.add(museLabel, c);
            
            //add the base layer
            this.add(base_layer);
        }
}
